/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Bai2;

import java.io.File;
import javax.swing.filechooser.FileFilter;

/**
 *
 * @author Thu
 */
public class MyFileFilter1 extends FileFilter{
      public boolean accept(File f) {

                                String s = f.getName();

                                if (s.endsWith(".wmv")||s.endsWith(".avi")||s.endsWith(".mp4")) {
                                    return true;
                                } else {
                                    return false;
                                }
                            }

                            public String getDescription() {

                                return "Movie(*.wmv,*.avi,*.mp4)";
                            }

}
